GXDespoolPage
QuickDraw GX sends theGXDespoolPage
message to obtain the next page to be printed from the spool file. If you perform your own spooling, you need to override theGXDespoolPage
message to interpret your spool file format. Your override of theGXDespoolPage
message must match the following formal declaration:
OSErr MyDespoolPage (gxSpoolFile aSpoolFile, long pageNum, gxFormat aFormat, gxShape *aShape, Boolean *formatChanged);
aSpoolFile
- The spool file.
pageNum
- The page number of the despooled page.
aFormat
- A format object that is filled in by this function. This object needs to be preallocated.
aShape
- On return, a reference to the data that belongs on the page in the form of a picture shape.
formatChanged
- On return, a Boolean value that is
true
if the page contains a format that is different from the previous format returned by theGXDespoolPage
message andfalse
if not.- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX, in its default implementation of theGXImagePage
message, sends theGXDespoolPage
message to obtain the next page in the spool file to be printed.You can override this message to change the default settings in a newly created format object. If you override the
GXSpoolPage
message to encrypt data, you need to overrideGXDespoolPage
to decrypt the data.The default implementation of the
GXDespoolPage
message reads the format and shape data for this page. It reads the page data from the spool file and repeatedly sends theGXDespoolData
message.SPECIAL CONSIDERATIONS
You rarely send theGXDespoolPage
message yourself.If you are providing your own spooling, you need to totally override the
GXDespoolPage
message and all of the other spooling and despooling messages.If you are not providing your own spooling, you must forward the
GXDespoolPage
message to allow the default implementation to read the data from the spool file. Forward this message prior to modifying the graphics shape or related format object.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. gxIncompletePrintFileErr The spool file is not complete. gxCrashedPrintFileErr The spool file could not be opened. gxInvalidPrintFileVersion The version number of the spool file is not valid. SEE ALSO
You can find an example of an overide of theGXDespoolPage
message in Listing 2-14 on page 2-25.The
GXImagePage
message is described on page 4-94.The
GXSpoolPage
message is described on page 4-69.The
GXDespoolData
message is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help